package com.aaa.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;

/**
 * (YzhUser)实体类
 *
 * @author makejava
 * @since 2023-06-05 09:34:00
 */
public class YzhUser implements Serializable {
    private static final long serialVersionUID = 653202058232028921L;
    
    private Integer id;
    
    private String username;
    
    private String password;
    
    private String sex;
    
    private String imgpath;

    // 把日期转化为date     yyyy-MM-dd
    //  接受前端传递过来的数据  格式必须满足 pattern的格式的时候   时间-》Date
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    // 返回到前端的数据不是一个时间的毫秒数的话
    // 响应给前端json数据的时候  把时间的毫秒数转化为 pattern的格式
    //@JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    private String tel;

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getImgpath() {
        return imgpath;
    }

    public void setImgpath(String imgpath) {
        this.imgpath = imgpath;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }


    @Override
    public String toString() {
        return "YzhUser{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", sex='" + sex + '\'' +
                ", imgpath='" + imgpath + '\'' +
                ", birthday=" + birthday +
                ", tel='" + tel + '\'' +
                '}';
    }
}

